﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace ConsumeAndProduceFactory
{
    class ThreadMonitor
    {
        private ConsumeAndProduceFactory m_Factory;

        public ThreadMonitor(ConsumeAndProduceFactory factory)
        {
            m_Factory = factory;
        }

        public void reset()
        {
        }

        public void start()
        {
        }

        public void checkStatus()
        {
            while (true)
            {
                foreach(IConsumer consumer in m_Factory.consumerList)
                {

                }

                foreach (IConsumer producer in m_Factory.producerList)
                {

                }

                Thread.Sleep(1000);//每隔1秒检查一次所有进程状态
            }
        }
    }
}
